package com.building.common;

public enum ResultCode {
    NOT_RESORCE(404, "没有资源"),
    SERVER_EXCEPTION(500, "服务器异常"),
    ERROR(400, "请求失败"),
    SUCCESS(200, "响应成功"),
    USER_NOT_EXIST(1001, "用户不存在"),
    USER_PASSWORD_ERROR(1002, "用户密码错误!");

    private Integer code;

    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "ResultCode{" +
                "code=" + code +
                ", message='" + message + '\'' +
                '}';
    }
}
